/*******************************************************************************
 * Copyright (c) Jerges A. Bello G. 2014. Reservado todos los derechos.
 ******************************************************************************/
package com.jabex.common.to;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Past;
import javax.validation.constraints.Size;

import org.joda.time.LocalDate;

/**
 * Created by Jerges Bello on 17/05/2014.
 */
public class UserTO implements Serializable {
    private Long code;
	@NotNull
	@Size(min = 1, max = 30)
	private String userName;
	@NotNull
	@Size(min = 1, max = 30)
	private String name;
	@NotNull
	private String documentId;
	@NotNull
	private String typeDocument;
	@NotNull
	@Size(min = 1, max = 30)
	private String lastName1;
	private String lastName2;
	@NotNull
	private String email;
	private String telephone;
	private Character sex;
	@Past
	@NotNull
	private LocalDate dataBirth;
	private Boolean isActive;
	private List<RolTO> rolList;
	private SecurityTO security;


	public UserTO() {
		this.userName = "";
		this.name = "";
		this.documentId = "";
		this.typeDocument = "";
		this.lastName1 = "";
		this.lastName2 = "";
		this.email = "";
		this.telephone = "";
		this.isActive = true;
		this.security = new SecurityTO();
		this.rolList = new ArrayList<RolTO>();
	}

    public Long getCode() {
        return code;
    }

    public void setCode(Long code) {
        this.code = code;
    }

    public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDocumentId() {
		return documentId;
	}

	public void setDocumentId(String documentId) {
		this.documentId = documentId;
	}

	public String getTypeDocument() {
		return typeDocument;
	}

	public void setTypeDocument(String typeDocument) {
		this.typeDocument = typeDocument;
	}

	public String getLastName1() {
		return lastName1;
	}

	public void setLastName1(String lastName1) {
		this.lastName1 = lastName1;
	}

	public String getLastName2() {
		return lastName2;
	}

	public void setLastName2(String lastName2) {
		this.lastName2 = lastName2;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getTelephone() {
		return telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	public Character getSex() {
		return sex;
	}

	public void setSex(Character sex) {
		this.sex = sex;
	}

	public LocalDate getDataBirth() {
		return dataBirth;
	}

	public void setDataBirth(LocalDate dataBirth) {
		this.dataBirth = dataBirth;
	}

	public Boolean getIsActive() {
		return isActive;
	}

	public void setIsActive(Boolean isActive) {
		this.isActive = isActive;
	}

	public List<RolTO> getRolList() {
		return rolList;
	}

	public void setRolList(List<RolTO> rolList) {
		this.rolList = rolList;
	}

	public SecurityTO getSecurity() {
		return security;
	}

	public void setSecurity(SecurityTO security) {
		this.security = security;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	enum TYPE_USER {
		CLIENT, PROVIDER, ADMINISTRATOR;
	}
}
